﻿var http_request = false;

function makerequest(act, month, year) {
    var pars = '?';
    http_request = false;
    if (window.XMLHttpRequest) { http_request = new XMLHttpRequest(); } else if (window.ActiveXObject) { try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } }
    if (!http_request) {
        alert('Ajax Error');
        return false;
    }
    http_request.onreadystatechange = function() {
      if (http_request.readyState == 4) {
          if (http_request.status == 200) {
              document.getElementById('izeit').innerHTML = http_request.responseText;
          } else {
              document.getElementById('izeit').innerHTML = 'Error connecting to server';
          }
      } else {
          document.getElementById('izeit').innerHTML = '<div id="ajaxload"><p>Loading...</p></div>';
      }
    }
 
    pars += act+'=1&ajax=1&mode=mini&month='+month+'&year='+year+'&cat='+eventcatstring;
    http_request.open('GET', url+pars, true);
    http_request.send(null);
}